import { USERINFO, UserInfoData } from '../constants/userInfo'

interface UserAcionType {
  type: string
  payload: UserInfoData
}
const USERINFO_DATA = {}
// state就是当前的值
export default function userInfo(state = USERINFO_DATA, action: UserAcionType) {
  switch (action.type) {
    case USERINFO:
      return action.payload
    default:
      return state
  }
}
